<template>
    <div class="admin-page">
        <div class="page-header">
            <el-table  height="560" :data="adminList" border style="width: 100%;overflow-y: auto"
                      :header-cell-style="{background:'#FAFAFA',color:'#666', fontSize:'13px'}" size="small">
                <el-table-column prop="id" label="ID"/>
                <el-table-column prop="nickname" label="用户名"/>
                <el-table-column prop="username" label="手机号"/>
                <el-table-column prop="is_up" label="用户等级"/>
                <el-table-column prop="type" label="类型"/>
                <el-table-column prop="amount" label="金额"/>
                <el-table-column prop="create_time" label="下单时间"/>
            </el-table>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            adminList: [],
            currentPage: 1,
            pageSize: 15,
            total: 0,
            receivedData: {}
        };
    },
    mounted() {
        this.receivedData = this.$route.query.data;
        console.log(this.receivedData);
        this.fetchAdminList();
    },
    methods: {
        fetchAdminList() {
            console.log(this.receivedData.id);
            this.$http.get('/admin/UserGrade/getOrderdivInfo', {
                // 通过 params 选项传递 query 参数
                params: {
                    order_id: this.receivedData.id
                }
            }).then(result => {
                console.log(result);
                if (result.code === 200) {
                    this.adminList = result.data;
                }
            });
        },
        reset() {
            this.form = {
                search: "",
                state: "",
                start_time: "",
                end_time: ""
            };
            this.currentPage = 1;
            this.fetchAdminList();
        },
    }
};
</script>
<style lang="less" scoped>
.admin-page {
    padding: 24px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);

    .page-header {
        margin-bottom: 24px;
        padding-bottom: 16px;
        border-bottom: 1px solid #f0f2f5;
    }

}

</style>


